package com.sfh.sfhshopweb.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class CosClientRunner implements ApplicationRunner, DisposableBean {
	@Override
    public void run(ApplicationArguments args) throws Exception {
        CosUtils.initCosClient();
    }
    
    @Override
    public void destroy() throws Exception {
        CosUtils.shutdownClient();
    }
}
